home *** CD-ROM | disk | FTP | other *** search
- Path: newsserver.amsinc.com!usenet
- From: Chris Corry <christopher_corry@mail.amsinc.com>
- Newsgroups: comp.lang.c++
- Subject: Number class
- Date: Thu, 08 Feb 1996 18:40:03 -0500
- Organization: American Management Systems, Inc.
- Message-ID: <311A89D3.562A@mail.amsinc.com>
- NNTP-Posting-Host: ccorry.amsinc.com
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 2.0GoldB1 (Win95; I)
-
- I seem to remember reading some years back (I believe in C++ Report)
- about how writing a Number class with complete number semantics (i.e.,
- all operator support - including precedence) was much more difficult
- than it initially appears (I seem to recall the word "impossible").
- With the exception that you couldn't use array initializers a la:
-
- // Works fine for ints but illegal for C++ classes
- MyNumber NumArray[] = { 45, 34, 56, 89 };
-
- what other reasons can you think of for trying to write a number class?
- I've just spent several hours in a design meeting arguing that it's a
- Real Bad Idea and couldn't come up with better reasons off the top of
- me head.
-
- Thanks all,
-
- - Chris
-
-
- Chris Corry
-